﻿CREATE FUNCTION [usix].[Comment_Export](
@UsixID VARCHAR(8),
@CompanyID tinyint,
@Agent varchar(32),
@DateFull datetime
)RETURNS varchar(1024)AS
BEGIN

DECLARE @Comment varchar(1024)

SELECT @Comment = ISNULL(@Comment+'
','')+Comment
FROM         usix.t_Comment_Export
WHERE [Id #] = @UsixID AND CompanyID = @CompanyID AND
			Agent = @Agent AND 
DateFull = @DateFull

RETURN @Comment
END



